package com.codeZ.ChainOfResponsibilityPattern.achieve;

/**
 * 具体处理类A
 *
 * @author codeZhang
 * @Date 2024/8/28 10:23
 */
public class HandlerA extends Handler{
    @Override
    public void handle(RequestData requestData) {
        System.out.println("HandlerA 执行代码逻辑! 处理: " + requestData.getData());

        requestData.setData(requestData.getData().replace("A",""));

        if(successor != null){
            successor.handle(requestData);
        }else{
            System.out.println("执行中止!");
        }
    }
}
